import { memberList } from "@/request/api"
const state = {
    memberlist: []
}

const getters = {
    getMemberList(state) {
        return state.memberlist
    }
}

const mutations = {
    REQ_MEMBER(state, payload) {
        state.memberlist = payload
    }
}

const actions = {
    changeMemberAction({ commit }) {
        memberList().then(res => {
            console.log(res, '会员列表');
            commit('REQ_MEMBER', res.list)
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}